export const GEOJSON_EMPTY = {
    type: 'FeatureCollection',
    features: [],
};


export function getPointJson(coords, properties = {}) {
    if(coords.length !== 2) throw new Error('坐标不正确')
    return {
        "type":"Feature",
        "properties":{
            ...properties
        },
        "geometry":{
            "type":"Point",
            "coordinates":coords
        }
    }
}